package shoooter.entity.bonus;

import java.awt.Color;
import java.awt.Graphics2D;
import shoooter.geometry.Vec2;
import shoooter.GameState;


public class BombBonus extends Bonus {
    
    public BombBonus(GameState g) {
        super();
        this.type = BOMB;
        this.elapsed_limit = 1;
        // si piazza nella posizione del giocatore
        vPos = new Vec2(rand.nextDouble()*200+100, rand.nextDouble()*200+100);
        this.g = g;
    }

    @Override
    void apply() {
        g.p.addSperimentalBomb();
        //g.p.hp = g.p.hp > 130 ? 150 : g.p.hp + 20;
    }

    @Override
    public void draw(Graphics2D g2d) {

        g2d.setColor(Color.ORANGE);
        g2d.fillOval((int)this.getX()-w/2, (int)this.getY()-h/2, w, h);

        g2d.setColor(Color.BLACK);
        g2d.drawOval((int)this.getX()-w/2, (int)this.getY()-h/2, w, h);

    }
    
}